package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EmpInfoRequireType;
import org.jsola.hr.constant.EmpInfoScene;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.EmpTrainRequireExample.E_ASSESS_RESULT;
import static org.jsola.hr.example.EmpTrainRequireExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpTrainRequireExample.E_END_TIME;
import static org.jsola.hr.example.EmpTrainRequireExample.E_REQUIRE_TYPE;
import static org.jsola.hr.example.EmpTrainRequireExample.E_START_TIME;
import static org.jsola.hr.example.EmpTrainRequireExample.E_TRAIN_ADDRESS;
import static org.jsola.hr.example.EmpTrainRequireExample.E_TRAIN_COURSE;
import static org.jsola.hr.example.EmpTrainRequireExample.E_TRAIN_DURATION;
import static org.jsola.hr.example.EmpTrainRequireExample.E_TRAIN_MODE;
import static org.jsola.hr.example.EmpTrainRequireExample.E_TRAIN_ORG_NAME;
import static org.jsola.hr.example.EmpTrainRequireExample.M_ASSESS_RESULT_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpTrainRequireExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.EmpTrainRequireExample.M_END_TIME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_REQUIRE_TYPE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_REQUIRE_TYPE_MAX;
import static org.jsola.hr.example.EmpTrainRequireExample.M_REQUIRE_TYPE_NOT_NULL;
import static org.jsola.hr.example.EmpTrainRequireExample.M_START_TIME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_TRAIN_ADDRESS_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_TRAIN_COURSE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_TRAIN_DURATION_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_TRAIN_MODE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.M_TRAIN_ORG_NAME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpTrainRequireExample.N_ASSESS_RESULT;
import static org.jsola.hr.example.EmpTrainRequireExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpTrainRequireExample.N_END_TIME;
import static org.jsola.hr.example.EmpTrainRequireExample.N_REQUIRE_TYPE;
import static org.jsola.hr.example.EmpTrainRequireExample.N_START_TIME;
import static org.jsola.hr.example.EmpTrainRequireExample.N_TRAIN_ADDRESS;
import static org.jsola.hr.example.EmpTrainRequireExample.N_TRAIN_COURSE;
import static org.jsola.hr.example.EmpTrainRequireExample.N_TRAIN_DURATION;
import static org.jsola.hr.example.EmpTrainRequireExample.N_TRAIN_MODE;
import static org.jsola.hr.example.EmpTrainRequireExample.N_TRAIN_ORG_NAME;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【公司员工培训记录所需信息】的参数")
@Data
public class EmpTrainRequireAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_REQUIRE_TYPE, example = E_REQUIRE_TYPE, required = true, allowableValues = EmpInfoScene.VALUES_STR)
    @NotNull(message = M_REQUIRE_TYPE_NOT_NULL)
    @Length(max = 20, message = M_REQUIRE_TYPE_MAX)
    @Const(constClass = EmpInfoScene.class, message = M_REQUIRE_TYPE_ENUM_NOT_MATCH)
    private String requireType;

    @ApiModelProperty(notes = N_TRAIN_COURSE, example = E_TRAIN_COURSE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_TRAIN_COURSE_ENUM_NOT_MATCH)
    private Integer trainCourse;

    @ApiModelProperty(notes = N_START_TIME, example = E_START_TIME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_START_TIME_ENUM_NOT_MATCH)
    private Integer startTime;

    @ApiModelProperty(notes = N_END_TIME, example = E_END_TIME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_END_TIME_ENUM_NOT_MATCH)
    private Integer endTime;

    @ApiModelProperty(notes = N_TRAIN_DURATION, example = E_TRAIN_DURATION, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_TRAIN_DURATION_ENUM_NOT_MATCH)
    private Integer trainDuration;

    @ApiModelProperty(notes = N_TRAIN_ORG_NAME, example = E_TRAIN_ORG_NAME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_TRAIN_ORG_NAME_ENUM_NOT_MATCH)
    private Integer trainOrgName;

    @ApiModelProperty(notes = N_ASSESS_RESULT, example = E_ASSESS_RESULT, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_ASSESS_RESULT_ENUM_NOT_MATCH)
    private Integer assessResult;

    @ApiModelProperty(notes = N_TRAIN_ADDRESS, example = E_TRAIN_ADDRESS, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_TRAIN_ADDRESS_ENUM_NOT_MATCH)
    private Integer trainAddress;

    @ApiModelProperty(notes = N_TRAIN_MODE, example = E_TRAIN_MODE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_TRAIN_MODE_ENUM_NOT_MATCH)
    private Integer trainMode;


}

